
#ifndef __LIBERTY_ENGINE_ASSETFILEFOLDER_H__
#define __LIBERTY_ENGINE_ASSETFILEFOLDER_H__

#include <Liberty3D/Engine/IMutableAssetFile.h>

namespace Liberty { namespace Engine {
    class AssetFileFolder : public IMutableAssetFile {
    protected:
        std::string _folder;
        
    public:
        AssetFileFolder(const std::string& folder);
        
    public:
        // IAssetFile
        virtual bool exists(const std::string& resourceName) const;
        virtual std::streambuf* open(const std::string& resourceName, std::ios::openmode mode) const;
        virtual void list(const std::string& folder, std::vector<std::string>& entries) const;

    public:
        // IMutableAssetFile
        virtual void makeDirectory(const std::string& folder, bool createIntermediates = false);
        virtual void remove(const std::string& path, bool recursive = false);
        virtual void sync();

    protected:
        std::string absolutePath(const std::string&) const;
    };
}}

#endif
